package emp.jsf.servicio.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import emp.entidades.EntBanner;
import emp.jsf.servicio.BannerService;
import emp.repositorios.BannerRepository;

@Service("bannerService")
public class BannerServiceImpl implements BannerService{

	@Autowired
	BannerRepository bannerRepository;
	
	public List<EntBanner> listarBanners(){
		return bannerRepository.findAll();
	}
	
	public EntBanner grabarBanner(EntBanner ent){
		return bannerRepository.save(ent);
	}
	
	public void eliminar(EntBanner ent){
		bannerRepository.delete(ent);
	}
	
}
